﻿<UserControl x:Class="DiscoveryLogic.UI.Layouts.Controls.PieOverlay"
        xmlns="http://schemas.microsoft.com/client/2007" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        Width="640"
        Height="480"
        >       
    <Canvas x:Name="PieOverlayCanvas" >
        <Canvas.Resources>
            <Storyboard x:Name="GrowOverlay">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.2" Storyboard.TargetName="PieOverlayCanvas" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1" KeySpline="0.5,0,0.504,1"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.2" Storyboard.TargetName="PieOverlayCanvas" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1" KeySpline="0.5,0,0.504,1"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.2" Storyboard.TargetName="PieOverlayCanvas" Storyboard.TargetProperty="Opacity">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1" KeySpline="0.5,0,0.504,1"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>

            <Storyboard x:Name="ShrinkOverlay">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="PieOverlayCanvas" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0" KeySpline="0.5,0,0.504,1"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="PieOverlayCanvas" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0" KeySpline="0.5,0,0.504,1"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="PieOverlayCanvas" Storyboard.TargetProperty="Opacity">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0" KeySpline="0.5,0,0.504,1"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>

        </Canvas.Resources>        
        
        <Canvas.RenderTransform>
            <TransformGroup>
                <ScaleTransform x:Name="OverlayScaleTransform" CenterX="320" CenterY="240"  ScaleX="0" ScaleY="0"></ScaleTransform>
            </TransformGroup>
        </Canvas.RenderTransform>
    </Canvas>
</UserControl>
